import { createSSRApp } from 'vue';
import Store from '@/store';
import App from '@/App';
import VuexMixin from '@/store/mixin';
import AxiosConfig from '@/apis/axios-config';
import AxiosApi from '@/apis/axios-api';
import Global from '@/utils/global';

export function createApp() {
	// 创建实例
	const app = createSSRApp(App);

	app.use(Store);
	app.use(AxiosConfig);
	app.use(AxiosApi);
	app.use(Global);
	app.mixin(VuexMixin);

	// 导出
	return {
		app
	};
}
